package com.lejin.api.cms;

import com.lejin.cms.entity.Content;
import com.lejin.item.entity.CourseOutline;
import com.lejin.vo.CatCascadeVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@FeignClient("lejin-cms")
@RequestMapping("cms")
public interface CMSApi {
    @RequestMapping("content/findContentListByTpid/{tpid}")
    public List<Content> findContentListByTpid(@PathVariable String tpid);

    @RequestMapping("course-cat/findCat")
    public List<CatCascadeVO> findCat();

    @RequestMapping("course-cat/findCourseByPriceAsc/{catId}")
    public List<CourseOutline> findCourseByPriceAsc(@PathVariable String catId);

    @RequestMapping("course-cat/findCourseByHitsDesc/{cat2Id}")
    public List<CourseOutline> findCourseByHitsDesc(@PathVariable String cat2Id);
}
